package com.ruoyi.gcgl.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gcgl.mapper.SjWorkContractMapper;
import com.ruoyi.gcgl.domain.SjWorkContract;
import com.ruoyi.gcgl.service.ISjWorkContractService;
import com.ruoyi.common.core.text.Convert;

/**
 * 劳动合同到期Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-15
 */
@Service
public class SjWorkContractServiceImpl implements ISjWorkContractService 
{
    @Autowired
    private SjWorkContractMapper sjWorkContractMapper;

    /**
     * 查询劳动合同到期
     * 
     * @param id 劳动合同到期主键
     * @return 劳动合同到期
     */
    @Override
    public SjWorkContract selectSjWorkContractById(Long id)
    {
        return sjWorkContractMapper.selectSjWorkContractById(id);
    }

    /**
     * 查询劳动合同到期列表
     * 
     * @param sjWorkContract 劳动合同到期
     * @return 劳动合同到期
     */
    @Override
    public List<SjWorkContract> selectSjWorkContractList(SjWorkContract sjWorkContract)
    {
        return sjWorkContractMapper.selectSjWorkContractList(sjWorkContract);
    }

    /**
     * 新增劳动合同到期
     * 
     * @param sjWorkContract 劳动合同到期
     * @return 结果
     */
    @Override
    public int insertSjWorkContract(SjWorkContract sjWorkContract)
    {
        return sjWorkContractMapper.insertSjWorkContract(sjWorkContract);
    }

    /**
     * 修改劳动合同到期
     * 
     * @param sjWorkContract 劳动合同到期
     * @return 结果
     */
    @Override
    public int updateSjWorkContract(SjWorkContract sjWorkContract)
    {
        return sjWorkContractMapper.updateSjWorkContract(sjWorkContract);
    }

    /**
     * 批量删除劳动合同到期
     * 
     * @param ids 需要删除的劳动合同到期主键
     * @return 结果
     */
    @Override
    public int deleteSjWorkContractByIds(String ids)
    {
        return sjWorkContractMapper.deleteSjWorkContractByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除劳动合同到期信息
     * 
     * @param id 劳动合同到期主键
     * @return 结果
     */
    @Override
    public int deleteSjWorkContractById(Long id)
    {
        return sjWorkContractMapper.deleteSjWorkContractById(id);
    }
}
